<?php
/**
 * @Author: Marte
 * @Date:   2017-08-21 08:51:08
 * @Last Modified by:   Marte
 * @Last Modified time: 2017-08-21 09:26:50
 */
header('Content-Type:text/html;charset=utf-8');
require '../data/config_connect.php';
if(!isset($_POST["submit"])){
      exit('非法访问!');
  }
$_bookname=$_POST['search'];
$_sql='select bookid,typeid,bookname,bookauthor,words,isend,time,isshow,isvip from books where bookname="'.$_bookname.'"';
$_result=$_mysql->query($_sql);

if($_assoc0=$_result->fetch_assoc())
{

    echo "<script>location='admin_index.php?type=3&id=".$_assoc0['bookid']."&searchresult=1';</script>";

}
else{

    echo "<script>alert('未找到该用户');window.history.back();</script>";
}

?>
